package com.hp.springboottextcach.mapper;

import com.hp.springboottextcach.entity.deptmber;
import org.apache.ibatis.annotations.*;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

@Mapper
@Cacheable
public interface deptmberUs {

    @Select("select * from deptmber where id = #{id}")
    @CachePut(value = "deptmber")
    public deptmber SelectDeptmberByid(Integer id);

    @Update("update deptmber set name = #{name},pwd = #{pwd} where id = #{id}")
    public deptmber updateDeptmberBy(deptmber deptmber);

    @Delete("delete from deptmber where id=#{id}")
    public int delectById(Integer id);

    @Insert("insert into deptmber (name,pwd) values (#{name},#{pwd})")
    public void insertUser(deptmber deptmber);
}
